package com.chenchao.method;

/**
 * @encoding : UTF-8
 * @Time : 2020/12/4 15:31
 * @Author : Chen Chao
 * @File : javaSE.com.chenchao.method.Test5.java
 * @Software : IntelliJ IDEA
 * @since : 1.8
 *接口静态方法与默认方法
 */
public class Test05 {
    public static void main(String[] args) {
        RealSon realSon = new RealSon();
        System.out.println(IFather01.name());

    }
}
/**义父1号*/
interface IFather01{
    static String name(){
        return "real";
    }
    default String surname() {
        return "big";
    }
}
class RealSon extends RealFather implements IFather01{
    public static String name(){
        return "real";
    }
}
/**义子1号*/
interface ISon extends IFather01,IFather02{
    @Override
    default String surname() {
        return "middle";
    }
}

interface ISon02 extends IFather01{
    @Override
    default String surname() {
        return "middle";
    }
}
class RealSon02 implements ISon02{
    @Override
    public String surname() {
        return "middle2";
    }
}

/**义父2号*/
interface IFather02{
    default String surname(){
        return "small";
    }
}

/**亲爸一号*/
class RealFather{
    public static String name(){
        return "real";
    }
    public String surname(){
        return "real";
    }
}
